# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: Sylvain HENRY <hsyl20@yahoo.fr>
# Contributor: Hervé YVIQUEL <elldekaa@gmail.com>

pkgname=hwloc
pkgver=2.5.0
pkgrel=1
pkgdesc='Portable Hardware Locality is a portable abstraction of hierarchical architectures'
url='https://www.open-mpi.org/projects/hwloc/'
arch=('x86_64')
license=('BSD')
depends=('glibc' 'libtool' 'systemd-libs' 'libpciaccess')
makedepends=('cairo' 'libxml2' 'pciutils' 'systemd' 'libx11')
optdepends=('cairo' 'libxml2' 'pciutils' 'libx11')
options=('!docs')
source=(https://www.open-mpi.org/software/hwloc/v${pkgver%.*}/downloads/${pkgname}-${pkgver}.tar.bz2)
sha512sums=('9e8b829868cb9f5fd2fe84d8515d0dc8725ddc84c788a61c1e9e918eb2b29659eb73cf22a4189e6b887f5bfa3255c206f4ba924bd7fe2c88c185f4308c0949cd')
b2sums=('684367afa5fc056b9bf04b3a95bd8239ec70127d5e582948ca16a09323614ad0ef77278a120544af0a740b456f1ba24bffc861b9f132293fafb7da0597d0b688')

build() {
  cd hwloc-${pkgver}
  ./configure \
    --prefix=/usr \
    --sbindir=/usr/bin \
    --enable-plugins \
    --sysconfdir=/etc
  make
}

check() {
  cd hwloc-${pkgver}
  make check
}

package() {
  cd hwloc-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -Dm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim: ts=2 sw=2 et:
